#coding=utf-8
#LightCam 心跳程序
#init by hfh 20150313

import time,sys
import lc_libs

if __name__ == "__main__":

	hname=lc_libs.lc_gethostname()

	#主程序
	while True:
		logdate=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime())
		logtime=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime())
		message=str(logdate)+" "+hname+" Manager:"+hname+" Agent:LightCam Node:"+hname+" AlertGroup:HeartBeat AlertKey:Timing Severity:1 Type:2 Summary:"+logtime+" Heartbead Message"
		lc_libs.lc_alert(message)
		time.sleep(60)
